package com.wwlwxg.spring_security.controller;

import com.wwlwxg.spring_security.entity.Account;
import com.wwlwxg.spring_security.entity.People;
import com.wwlwxg.spring_security.service.AccountService;
import com.wwlwxg.spring_security.service.PeopleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MybatisController {

  @Autowired
  AccountService accountService;

  @Autowired
  PeopleService peopleService;

  @RequestMapping("/acount")
  public Account getAccount(Long id) {
    Account accountById = accountService.getAccountById(id);

    People people = peopleService.getById(1);

    return accountById;
  }


}
